package com.shen.demo.demos.web.domain.entry;

import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;

import javax.persistence.*;
@Setter
@Getter
@Entity
/*@EntityListeners(value = {UserNameListener.class}) // 实体类关联监听类 UserNameListener*/
public class UserName{

    @javax.persistence.Id
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    private String name;

    private Integer grade; // 保持为 String 类型

    private Integer age; // 保持为 String 类型

    @Override
    public String toString() {
        return "UserName{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", grade='" + grade + '\'' +
                ", age='" + age + '\'' +
                '}';
    }


}
